<div class="view-header">
    
</div>
<div class="view-content">
    <div class="set-item-content">
        <div class="set-item-row">

            <!-- 基盘赠送项目 -->
            <div class="set-item-block set-item-jipan">
                <div class="set-item-top">
                    <div class="set-item-icon fa fa-bell"></div>
                    <div class="set-item-title">基盘赠送项目</div>    
                </div>
                <div class="set-item-bottom">
                    <div class="set-item-item" ng-click="jipan_handler.item_list_open()"><i class="fa fa-navicon"></i>项目列表</div>
                    <div class="set-item-item" ng-click="jipan_handler.new_open()"><i class="fa fa-plus"></i>新增项目</div>
                    <div class="set-item-item" ng-click="jipan_handler.jipan_one_open()"><i class="fa fa-sign-in"></i>分配项目</div>
                </div>
                
                <div class="set-item-all-content" ng-show="jipan_handler.item_list_overlay">
                    <div class="set-item-all" ng-show="jipan_handler.item_list_overlay">
                        <div class="set-item-all-line">
                            <div class="set-item-all-item" ng-repeat="item in jipan_params.all_items">
                                <div>{{item.name}}</div>
                                <div class="fa fa-edit" ng-click="jipan_handler.modify_open(item)"></div>
                            </div>
                        </div>
                    </div>
                    <div class="set-item-all-edit" ng-show="jipan_handler.modify_overlay && jipan_handler.item_list_overlay">
                        <div class="set-item-new-line">
                            <input type="text" placeholder="项目" ng-model="jipan_params.modify_param.name">
                        </div>
                        <div class="set-item-new-line">
                            <input type="number" placeholder="金额" ng-model="jipan_params.modify_param.amount">
                        </div>
                        <div class="set-item-new-submit">
                            <span ng-click="jipan_handler.modify_submit()">提交</span>
                        </div>
                    </div>
                </div>
                <div class="set-item-new" ng-show="jipan_handler.new_overlay">
                    <div class="set-item-new-line">
                        <input type="text" placeholder="项目" ng-model="jipan_params.param.name">
                    </div>
                    <div class="set-item-new-line">
                        <input type="number" placeholder="金额" ng-model="jipan_params.param.amount">
                    </div>
                    <div class="set-item-new-submit">
                        <span ng-click="jipan_handler.new_submit()">提交</span>
                    </div>
                </div>
            </div>

            <!-- 售后赠送项目 -->
            <div class="set-item-block set-item-after-sale">
                <div class="set-item-top">
                    <div class="set-item-icon fa fa-pie-chart"></div>
                    <div class="set-item-title">售后赠送项目</div>    
                </div>
                <div class="set-item-bottom">
                    <div class="set-item-item set-item-sale-tab" ng-click="sales_handler.item_list_open()">
                        <i class="fa fa-navicon"></i>项目列表
                    </div>
                    <div class="set-item-item set-item-sale-tab" ng-click="sales_handler.new_open()">
                        <i class="fa fa-plus"></i>新增项目
                    </div>
                    <div class="set-item-item set-item-sale-tab" ng-click="sales_handler.handle_open()">
                        <i class="fa fa-sign-in"></i>分配项目
                    </div>
                </div>
                
                <div class="set-item-all-content" ng-show="sales_params.overlay.item_list">
                    <div class="set-item-all set-item-sale-bg" ng-show="sales_params.overlay.item_list">
                        <div class="set-item-all-line">
                            <div class="set-item-all-item" ng-repeat="item in sales_params.all_items">
                                <div>{{item.name}}</div>
                                <div class="fa fa-edit" ng-click="sales_handler.modify_open(item)"></div>
                            </div>
                        </div>
                    </div>
                    <div class="set-item-all-edit set-item-sale-bg" ng-show="sales_params.overlay.modify && sales_params.overlay.item_list">
                        <div class="set-item-new-line">
                            <input type="text" placeholder="项目" ng-model="sales_params.modify_param.name">
                        </div>
                        <div class="set-item-new-line">
                            <input type="number" placeholder="金额" ng-model="sales_params.modify_param.amount">
                        </div>
                        <div class="set-item-new-submit">
                            <span ng-click="sales_handler.modify_submit()">提交</span>
                        </div>
                    </div>
                </div>
                <div class="set-item-new set-item-sale-bg" ng-show="sales_params.overlay.new">
                    <div class="set-item-new-line">
                        <input type="text" placeholder="项目" ng-model="sales_params.param.name">
                    </div>
                    <div class="set-item-new-line">
                        <input type="number" placeholder="金额" ng-model="sales_params.param.amount">
                    </div>
                    <div class="set-item-new-submit">
                        <span ng-click="sales_handler.new_submit()">提交</span>
                    </div>
                </div>
            </div>
        </div>

        <div class="set-item-body" ng-init="jipan_two = false" ng-show="jipan_one">
            <div class="set-item-body-title">
                <div class="set-item-body-title-1" ng-show="jipan_one">选择需要分配项目的门店</div>
                <div class="set-item-body-title-2" ng-show="jipan_two">门店--{{jipan_params.shop.name}}--分配项目</div>
            </div>
            <div class="set-item-body-content">
                <div class="set-item-list" ng-click="jipan_two = true" ng-show="jipan_one">
                    <div class="set-item-line" ng-repeat="shop in jipan_params.all_shops" ng-class="{true: 'marked', false: ''}[shop.iscolor]" ng-click="jipan_handler.shop_item(shop,jipan_params.all_shops)">{{shop.name}}</div>
                </div>
                <div class="set-item-handler" ng-show="jipan_two">
                    <div class="set-item-attach">
                        <div class="set-item-attach-title">门店--{{jipan_params.shop.name}}--未包含项目</div>
                        <div class="set-item-attach-content">
                            <div class="set-item-attach-item" 
                                ng-repeat="attach_item in jipan_params.all_jipan_item_null_shop |orderBy:['name'] |filter:jipan_item_filter" 
                                ng-click="jipan_handler.attach(attach_item)">
                                {{attach_item.name}}
                                <i class="fa fa-plus"></i>
                            </div>
                        </div>
                    </div>
                    <div class="set-item-attach">
                        <div class="set-item-attach-title">门店--{{jipan_params.shop.name}}--已包含项目</div>
                        <div class="set-item-attach-content">
                            <div class="set-item-attach-item set-item-detach-item" 
                                ng-repeat="detach_item in jipan_params.shop_jipan_item |orderBy:['name'] |filter:jipan_item_shop_filter" 
                                ng-click="jipan_handler.detach(detach_item)">
                                {{detach_item.name}}
                                <i class="fa fa-minus"></i>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="set-item-body" ng-show="sales_params.overlay.handle">
            <div class="set-item-body-title set-item-sale-title">
                <div class="set-item-body-title-1" ng-show="sales_params.overlay.handle">选择需要分配项目的门店</div>
                <div class="set-item-body-title-2" ng-show="sales_params.overlay.handler">门店--{{jipan_params.shop.name}}--分配项目</div>
            </div>
            <div class="set-item-body-content">
                <div class="set-item-list" ng-click="sales_params.overlay.handler = true" ng-show="sales_params.overlay.handle">
                    <div class="set-item-line" ng-repeat="shop in jipan_params.all_shops" ng-class="{true: 'marked', false: ''}[shop.iscolor]" ng-click="sales_handler.shop_item(shop,jipan_params.all_shops)">{{shop.name}}</div>
                </div>
                <div class="set-item-handler" ng-show="sales_params.overlay.handler">
                    <div class="set-item-attach">
                        <div class="set-item-attach-title">门店--{{sales_params.shop.name}}--未包含项目</div>
                        <div class="set-item-attach-content">
                            <div class="set-item-attach-item" 
                                ng-repeat="attach_item in sales_params.all_sales_item_null_shop |orderBy:['name'] |filter:sales_item_filter" 
                                ng-click="sales_handler.attach(attach_item)">
                                {{attach_item.name}}
                                <i class="fa fa-plus"></i>
                            </div>
                        </div>
                    </div>
                    <div class="set-item-attach">
                        <div class="set-item-attach-title">门店--{{sales_params.shop.name}}--已包含项目</div>
                        <div class="set-item-attach-content">
                            <div class="set-item-attach-item set-item-detach-item" 
                                ng-repeat="detach_item in sales_params.shop_sales_item |orderBy:['name'] |filter:sales_item_shop_filter" 
                                ng-click="sales_handler.detach(detach_item)">
                                {{detach_item.name}}
                                <i class="fa fa-minus"></i>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
        </div>

    </div>
</div>